package Test;

import org.junit.Test;

import DB.ChatTableDB;
import DB.CouchDB;
import DB.GroupAndUsersTableDB;
import DB.GroupTableDB;

import junit.framework.TestCase;

public class DBTest extends TestCase {
	@Test
	public void testChatTable() {
		ChatTableDB chatTableDB = new ChatTableDB();
		//chatTableDB.createChat("joshua", "2764003675796", "test");
		//chatTableDB.deleteChat("joshua", "2764003675796");
		assertEquals( "fName", null );
	}

	@Test
	public void testGroupsTable() {
		GroupTableDB groupTableDB = new GroupTableDB();
		//GroupAndUsersTableDB groupAndUsersTableDB = new GroupAndUsersTableDB();
		//groupAndUsersTableDB.createGroupAndUsers("joshua1", "2764193541866");
		//groupAndUsersTableDB.deleteGroupAndUsers("joshua1", "2764193541866");
		//groupTableDB.createGroup("joshuazhu1989@gmail.com", "test1");
		assertEquals( "fName", null );
	}

	@Test
	public void testUsers() {
		// MyClass is tested
		   CouchDB tester = new CouchDB();
		   tester.createUser("huzhu1989@gmail.com", "aHV6aHVAc3R1ZGVudC51bmltZWxiLmVkdS5hdQ==");
		  // tester.deleteUser("joshua");
		   // check if multiply(10,5) returns 50
		   //tester.deleteUser("joshua");
		   assertEquals( "fName", null );
	}
	
	@Test
	public void testRelation(){
		GroupAndUsersTableDB groupAndUsersTableDB = new GroupAndUsersTableDB();
		//groupAndUsersTableDB.createGroupAndUsers("joshua1", "2764193541866");
	}
	
	@Test
	public void testChats(){
		ChatTableDB chatTableDB = new ChatTableDB();
		//for(int i =0 ; i < 10; i ++)
		//chatTableDB.createChat("joshuazhu1989@gmail.com", "2764193541866", "hello!!!");
		
	}
}
